package com.caiyouxi.advertise.controller;

import com.caiyouxi.advertise.model.PageAddressBean;
import com.caiyouxi.advertise.service.PageAddressService;
import com.caiyouxi.common.bean.ResData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/advertise")
public class PageAddressController {
    @Autowired
    private PageAddressService pageAddressService;

    @RequestMapping("/add_page_address")
    public ResData add_page_address(@RequestBody PageAddressBean bean){
        return pageAddressService.add_page_address(bean);
    }

    @RequestMapping("/delete_page_address")
    public ResData delete_page_address(@RequestBody PageAddressBean bean){
        return pageAddressService.delete_page_address(bean);
    }

    /**
     * 查询所有
     * */
    @RequestMapping("/get_page_address")
    public ResData get_page_address(@RequestBody PageAddressBean bean){
        return pageAddressService.get_page_address(bean);
    }
}
